﻿<%@ Page Language="C#" MasterPageFile="~/web.master" AutoEventWireup="true" CodeBehind="branch_plan_add.aspx.cs" Inherits="Shuba.Web.master.branch_plan_add"%>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
			<table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
				<tr>
					<td class="text bg_content" bgcolor="#FFFFFF" align="center"><p>&nbsp;</p>
			<table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
				<tr>
					<td class="title_back" align="left">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="30%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
                    </td>
					<td class="title_back" align="right">
					<a class="text" href="branch_plan_list.aspx">Plan List</a>&nbsp;&nbsp;
					</td>				                            
				</tr>
				<tr>
					<td colspan="2" class="border_nobottom bg_subtitle_white">&nbsp; Insert / Update</td>
				</tr>
				<tr>
				<td colspan="2">
					<table class="black" border="0" width="100%" cellspacing="0" cellpadding="3">
                        <tr>
                            <td class="border_left border_right bg_grid2" colspan=4>&nbsp;</td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right" width="20%">TARGET YEAR</td>
						    <td class="border_right bg_grid2" align="left" colspan="3">
    						    <asp:Label ID="lblYear" runat="server" Text="Label"></asp:Label>
						    </td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">REGION</td>
						    <td class="border_right bg_grid2" align="left" colspan="3">
    						    <asp:Label ID="lblRegion" runat="server" Text="Label"></asp:Label>
						    </td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">CLUSTER</td>
						    <td class="bg_grid2" align="left">
    						    <asp:Label ID="lblCluster" runat="server" Text="Label"></asp:Label>
						    </td>
						    <td class="bg_grid2" align="right">UNIT</td>						    
						    <td class="border_right bg_grid2" align="left">
    						    <asp:Label ID="lblUnit" runat="server" Text="Label"></asp:Label>
						    </td>
                        </tr>
                        <tr>
                            <td class="border bg_grid" colspan="4">TOTAL ORIGINAL TARGET</td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED AMOUNT</td>
						    <td class="bg_grid2" align="left" width="20%">
    						    <asp:Label ID="lblAmount" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						    <td class="bg_grid2" align="right" width="20%">ASSIGNED AMOUNT</td>
						    <td class="border_right bg_grid2" align="left">
						     <asp:Label ID="lblAssignedAmount" runat="server" Text="Label"></asp:Label></td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED NOA</td>
						    <td class="bg_grid2" align="left">
						        <asp:Label ID="lblNoa" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED NOA</td>
						    <td class="border_right bg_grid2" align="left">
                                <asp:Label ID="lblAssignedNoa" runat="server" Text="Label"></asp:Label>&nbsp;					    
						    </td>
                        </tr>
                        <tr>
                            <td class="border bg_grid" colspan="4">TOTAL REAL TARGET</td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED AMOUNT</td>
						    <td class="bg_grid2" align="left">
    						    <asp:Label ID="lblAmountReal" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED AMOUNT</td>
						    <td class="border_right bg_grid2" align="left">
						     <asp:Label ID="lblAssignedAmountReal" runat="server" Text="Label"></asp:Label></td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED NOA</td>
						    <td class="bg_grid2" align="left">
						        <asp:Label ID="lblNoaReal" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED NOA</td>
						    <td class="border_right bg_grid2" align="left">
                                <asp:Label ID="lblAssignedNoaReal" runat="server" Text="Label"></asp:Label>&nbsp;					    
						    </td>
                        </tr>
                        <tr>
                            <td class="border bg_grid" colspan="4">TOTAL ASSIGNED IN UNIT</td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGET AMOUNT ORIG.</td>
						    <td class="bg_grid2" align="left">
						    <asp:Label ID="lblAmountBranch" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED NOA ORIG.</td>
						    <td class="border_right bg_grid2" align="left">
    						    <asp:Label ID="lblNoaBranch" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						</tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGET AMOUNT REAL</td>
						    <td class="bg_grid2" align="left">
						    <asp:Label ID="lblAmountBranchReal" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED NOA REAL</td>
						    <td class="border_right bg_grid2" align="left">
    						    <asp:Label ID="lblNoaBranchReal" runat="server" Text="Label"></asp:Label>&nbsp;
						    </td>
						</tr>
					    <tr>
                        <td class="border" colspan="4">                    
                        <asp:HiddenField ID="HidUnitID" runat="server" />
	                            <cc:SHUBAGrid ID="gvList" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="MonthID"
	                            OnRowDataBound="gvList_RowDataBound">
                                <Columns>
                                    <asp:BoundField DataField="MonthID" HeaderText="MONTH" SortExpression="MonthID" HeaderStyle-Width="5%" ItemStyle-HorizontalAlign=Center />
                                    <asp:BoundField DataField="MonthName" HeaderText="NAME" SortExpression="MonthName" HeaderStyle-Width="15%" ItemStyle-HorizontalAlign=Left />
                                    <asp:TemplateField HeaderStyle-Width="20%" HeaderText="TARGET AMOUNT ORIG." HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
                                        <ItemTemplate>
					                        <asp:TextBox ID="txtTargetAmount" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=12 CssClass="text" Text=<%# DataBinder.Eval (Container.DataItem, "TargetAmount")%> runat="server"></asp:TextBox>
					                        <asp:RangeValidator ID="RangeValidatorAmount" ValidationGroup runat="server" CssClass="text" Text="*" ErrorMessage="Amount" ControlToValidate="txtTargetAmount" Type=Double MinimumValue="0"></asp:RangeValidator>
					                    </ItemTemplate>
					                </asp:TemplateField>
					                <asp:TemplateField HeaderStyle-Width="20%" HeaderText="NOA ORIG." HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
					                    <ItemTemplate>
					                        <asp:TextBox ID="txtNoa" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=8 CssClass="text" runat="server" Text=<%# DataBinder.Eval (Container.DataItem, "Noa")%>></asp:TextBox>
					                        <asp:RangeValidator ID="RangeValidatorNoa" runat="server" CssClass="text" Text="*" ErrorMessage="NOA" ControlToValidate="txtNoa" Type=Double MinimumValue="0"></asp:RangeValidator>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderStyle-Width="20%" HeaderText="TARGET AMOUNT REAL" HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
                                        <ItemTemplate>
					                        <asp:TextBox ID="txtTargetAmountReal" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=12 CssClass="text" Text=<%# DataBinder.Eval (Container.DataItem, "TargetAmountReal")%> runat="server"></asp:TextBox>
					                        <asp:RangeValidator ID="RangeValidatorAmountReal" ValidationGroup runat="server" CssClass="text" Text="*" ErrorMessage="Amount" ControlToValidate="txtTargetAmountReal" Type=Double MinimumValue="0"></asp:RangeValidator>
					                    </ItemTemplate>
					                </asp:TemplateField>
					                <asp:TemplateField HeaderStyle-Width="20%" HeaderText="NOA REAL" HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
					                    <ItemTemplate>
					                        <asp:TextBox ID="txtNoaReal" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=8 CssClass="text" runat="server" Text=<%# DataBinder.Eval (Container.DataItem, "NoaReal")%>></asp:TextBox>
					                        <asp:RangeValidator ID="RangeValidatorNoaReal" runat="server" CssClass="text" Text="*" ErrorMessage="NOA" ControlToValidate="txtNoaReal" Type=Double MinimumValue="0"></asp:RangeValidator>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <PagerSettings Mode="Numeric" Visible="true" />
                            </cc:SHUBAGrid>

				        <!-- Error Message -->
				        <table runat=server visible=false id="ErrBox" class="border" border="0" width="100%" cellspacing="0" cellpadding="2">
				        <tr>
				        <td class="bg_grid2" align=center><asp:Label ID="ErrMsg" runat="server" Text="" Font-Bold=true ForeColor="Red"></asp:Label></td>
				        </tr>
				        </table>
				        <!-- End Of Error Message -->
                        </td>
                    </tr>
                    </table>
					
				</td></tr>
				<tr>
				<td class="border bg_footer" colspan="2" align=right>
				    <asp:UpdatePanel ID="UpdatePanel9" runat="server">
				    <ContentTemplate>
				        <%--OnClientClick="return confirm('Changing this value will impact to other target plan\nPlease make sure Region, Cluster and Unit Target Plan...!!!')"  --%>
                        <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="buttonsmall" onclick="btnSubmit_Click" />
                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="buttonsmall" CausesValidation="false" onclick="btnCancel_Click" />&nbsp; &nbsp;
                   </ContentTemplate>
                   </asp:UpdatePanel>
                </td></tr>
			</table>			
			<!-- VALIDATION MESSAGE -->
			<asp:ValidationSummary ID="ValidationSummary1" HeaderText="Invalid Entry On:"
            ShowMessageBox="true"
            ShowSummary="false"
            EnableClientScript="true"
            runat="server" />
			
			<p align=center>&nbsp;</p>
			
					</td>
				</tr>
</table>
</asp:Content>
